package com.sitanyun.merchant.guide.frament.presenter.impl;

import com.sitanyun.merchant.guide.frament.model.impl.UserMessageAModelImpl;
import com.sitanyun.merchant.guide.frament.model.inter.IUserMessageAModel;
import com.sitanyun.merchant.guide.frament.presenter.callback.CallBack;
import com.sitanyun.merchant.guide.frament.presenter.inter.IUserMessageAPresenter;
import com.sitanyun.merchant.guide.frament.view.inter.IUserMessageAView;

public class UserMessageAPresenterImpl implements IUserMessageAPresenter {
    private IUserMessageAView mIUserMessageAView;
    private IUserMessageAModel mIUserMessageAModel;

    public UserMessageAPresenterImpl(IUserMessageAView aIUserMessageAView) {
        mIUserMessageAView = aIUserMessageAView;
        mIUserMessageAModel = new UserMessageAModelImpl();
    }

    @Override
    public void getuser() {
        mIUserMessageAModel.setuser(new CallBack() {
            @Override
            public void onSuccess(Object response) {
                mIUserMessageAView.response(response,IUserMessageAView.RESPONSE_ONE);
            }

            @Override
            public void onError(Throwable t) {
                mIUserMessageAView.response(t,IUserMessageAView.RESPONSE_TWO);
            }
        });
    }
}
